<template>
    <div class="pagination_part">
        <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage4"
        :page-sizes="[7]"
        :page-size="7"
        layout="total, sizes, prev, pager, next, jumper"
        :total="num">
        </el-pagination>
    </div>
</template>

<style lang="scss">
    .pagination_part {
        margin-top: 20px;
    }
</style>

<script>
export default {
    props: ['num', 'router'],
    data() {
        return {
            currentPage4: 1,
        }
    },
    methods: {
        // 改变条数触发
        handleSizeChange() {
            // console.log(111);
        },
        // 翻页触发
        handleCurrentChange(page) {
            // console.log(222);
            // console.log(this.router);
            this.$router.replace(this.router + page)
            // console.log(this.router);
        }
    },
    
}
</script>